﻿using BPMN.DomianShare.PulicDto;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace BPMN.Domain.Interface
{
    public interface IRepositoryBase<T> where T : class
    {
        Task<dynamic> GetListPage(int PageIndex, int PageSize);
        Task<int> Add(T entity);
        Task<int> Update(T entity);
        Task<int> Delete(int Id);
        Task<int> RealDel(IEnumerable<T> list);
        Task<int> RealDeleteOne(int Id);
        Task<int> AddRange(List<T> list);
        Task<T> Get(int Id);
        //   Task<IQueryable<T>> ExecSql(string sql);
        Task<List<PulicDictonaryListResponseDto>> ExecSqlDictionary(string sql);
        Task<IQueryable<T>> GetAll();
        Task<int> SaveChange();
        void BeginTran();
        void CommitTran();
        void RollBackTran();
    }
}
